package com.sp.scmdb.bean;

import java.util.List;

public class RoleBean extends PageBean{
	
	/** 部门列表 */
	private List<CheckBoxEntityBean> departmentList;
	
	/** 菜单列表 */
	private List<MenuEntityBean> liseMenuEntityBean;
	
	/** 所选菜单项 */
	private String checkRight;
	
	/** 角色ID */
	private String id;

	/** 角色名称 */
	private String name;
	
	/** 角色所对应的菜单 */
	private String menu;

	/** 角色所对应的部门 */
	private String department;
	
	/** 操作权限 */
	private String operation;

	/**
	 * 部门列表取得
	 * @return 部门列表
	 */
	public List<CheckBoxEntityBean> getDepartmentList() {
		return departmentList;
	}

	/**
	 * 部门列表设置
	 * @param departmentList
	 */
	public void setDepartmentList(List<CheckBoxEntityBean> departmentList) {
		this.departmentList = departmentList;
	}

	/**
	 * 菜单列表取得
	 * @return 菜单列表
	 */
	public List<MenuEntityBean> getLiseMenuEntityBean() {
		return liseMenuEntityBean;
	}

	/**
	 * 菜单列表设置
	 * @param liseMenuEntityBean
	 */
	public void setLiseMenuEntityBean(List<MenuEntityBean> liseMenuEntityBean) {
		this.liseMenuEntityBean = liseMenuEntityBean;
	}
	
	/**
	 * 部门取得
	 * @return 部门
	 */
	public String getDepartment() {
		return department;
	}
	
	/**
	 * 部门设置
	 * @param department
	 */
	public void setDepartment(String department) {
		this.department = department;
	}
	
	/**
	 * 角色名取得
	 * @return 角色名
	 */
	public String getName() {
		return name;
	}

	/**
	 * 角色名设置
	 * @param name
	 */
	public void setName(String name) {
		this.name = name;
	}

	/**
	 * 菜单取得
	 * @return 菜单
	 */
	public String getMenu() {
		return menu;
	}

	/**
	 * 菜单设置
	 * @param menu
	 */
	public void setMenu(String menu) {
		this.menu = menu;
	}

	/**
	 * 操作权限取得
	 * @return 操作权限
	 */
	public String getOperation() {
		return operation;
	}

	/**
	 * 操作权限设置
	 * @param operation
	 */
	public void setOperation(String operation) {
		this.operation = operation;
	}
	
	/**
	 * 所选菜单项取得
	 * @return 所选菜单项
	 */
	public String getCheckRight() {
		return checkRight;
	}

	/**
	 * 所选菜单项设置
	 * @param checkRight
	 */
	public void setCheckRight(String checkRight) {
		this.checkRight = checkRight;
	}
	
	/**
	 * 角色ID取得
	 * @return 角色ID 
	 */
	public String getId() {
		return id;
	}

	/**
	 * 角色ID设置
	 * @param id
	 */
	public void setId(String id) {
		this.id = id;
	}
	
	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result
				+ ((checkRight == null) ? 0 : checkRight.hashCode());
		result = prime * result
				+ ((department == null) ? 0 : department.hashCode());
		result = prime * result
				+ ((departmentList == null) ? 0 : departmentList.hashCode());
		result = prime * result + ((id == null) ? 0 : id.hashCode());
		result = prime
				* result
				+ ((liseMenuEntityBean == null) ? 0 : liseMenuEntityBean
						.hashCode());
		result = prime * result + ((menu == null) ? 0 : menu.hashCode());
		result = prime * result + ((name == null) ? 0 : name.hashCode());
		result = prime * result
				+ ((operation == null) ? 0 : operation.hashCode());
		return result;
	}

	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		RoleBean other = (RoleBean) obj;
		if (checkRight == null) {
			if (other.checkRight != null)
				return false;
		} else if (!checkRight.equals(other.checkRight))
			return false;
		if (department == null) {
			if (other.department != null)
				return false;
		} else if (!department.equals(other.department))
			return false;
		if (departmentList == null) {
			if (other.departmentList != null)
				return false;
		} else if (!departmentList.equals(other.departmentList))
			return false;
		if (id == null) {
			if (other.id != null)
				return false;
		} else if (!id.equals(other.id))
			return false;
		if (liseMenuEntityBean == null) {
			if (other.liseMenuEntityBean != null)
				return false;
		} else if (!liseMenuEntityBean.equals(other.liseMenuEntityBean))
			return false;
		if (menu == null) {
			if (other.menu != null)
				return false;
		} else if (!menu.equals(other.menu))
			return false;
		if (name == null) {
			if (other.name != null)
				return false;
		} else if (!name.equals(other.name))
			return false;
		if (operation == null) {
			if (other.operation != null)
				return false;
		} else if (!operation.equals(other.operation))
			return false;
		return true;
	}
}
